package com.example.demo.程序员面试金典;

import com.example.demo.leetcode100题.ListNode;

/**
 * @author：zzc
 * @date: 2022/9/7
 */
public class 删除中间节点 {

    /**
     * Definition for singly-linked list.
     * public class ListNode {
     * int val;
     * ListNode next;
     * ListNode(int x) { val = x; }
     * }
     */
    class Solution {

        public void deleteNode(ListNode node) {
            node.val = node.next.val;
            node.next = node.next.next;
        }
    }


}
